//FYI: https://github.com/Tencent/puerts/blob/master/doc/unity/manual.md

import { FairyEditor } from 'csharp';
import {genCodeCustom }  from './GenCodeCustom'


function onPublish(handler: FairyEditor.PublishHandler) {

    if (!handler.genCode) return;
    handler.genCode = false; //prevent default output
    console.log('开始执行生成代码插件');
    let IconPKGName="CursorIcon";//针对Icon包生成图片资源URL代码
    let codeClassName:string="IconMgr";//生成图标管理类名字
    genCodeCustom(handler,IconPKGName,codeClassName);

}

function onDestroy() {
    //do cleanup here
}

export { onPublish, onDestroy };